//
//  CYRefreshControl.swift
//  WeiBo
//
//  Created by Mr_J on 16/3/16.
//  Copyright © 2016年 mac. All rights reserved.
//

import UIKit

enum CYRefreshControlState: Int {
    case Normal = 0, Pulling, Refreshing
}

private let CYRefreshContrlH: CGFloat = 50

class CYRefreshControl: UIControl {

    var refreshState: CYRefreshControlState = .Normal
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
        
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    private func setupUI() {
        backgroundColor = UIColor.yellowColor()
        
        frame.size = CGSize(width: SCREENW, height: CYRefreshContrlH)
        frame.origin.y = -CYRefreshContrlH
        
    }
    
    
}
